export default[
    {
        title: '登录名',
        key: 'loginName',
        minWidth: 150,
        align: 'center',
        fixed: "left"
    },
    {
        title: '姓名',
        key: 'userName',
        minWidth: 150,
        align: 'center',
        fixed: "left"
    },
    {
        title: "部门",
        key: "title",
        align: 'center',
        minWidth: 150,
    },
    {
        title: '操作组名称',
        key: 'groupName',
        align: 'center',
        minWidth: 150,
    },
    {
        title: '在岗状态',
        key: 'postStatus',
        align: 'center',
        minWidth: 150,
        filters: [
            {
                label: '在岗',
                value: "1"
            },
            {
                label: '离岗',
                value: "0"
            }
        ],
        filterMultiple: false,
        filterMethod (value, row) {
            if(value === "0"){
                if (value === row.postStatus) {
                    return row.postStatus === value;
                } else{
                    return row.postStatus === "";
                }
            }else{
                if (value === row.postStatus) {
                    return row.postStatus === value;
                }
            }
        },
        render: (h, params) => {
            let text = '';
            let color = '';
            let arr = params.row.postStatus;
            if(arr==="0"){
                text = '离岗';
            }else if(arr==="1"){
                text = '在岗';
                color = 'lightgreen';
            }else{
                text = '离岗';
            }
            return h('Tag', {
                    props: {
                        type:"dot",
                        color: color
                    }
                },
                text,
            )
        }
    },
    {
        title: '权重',
        key: 'weight',
        align: 'center',
        minWidth: 120,
    },
    {
        title: '总权重',
        key: 'totalWeight',
        align: 'center',
        minWidth: 120,
    },
    {
        title: '抢单权重',
        key: 'grabWeight',
        align: 'center',
        minWidth: 120,
    },
    {
        title: '日上限值',
        key: 'weightUpper',
        align: 'center',
        minWidth: 120,
    },
    {
        title: '待办数量',
        key: 'agencyNumber',
        align: 'center',
        minWidth: 120,
    },
    {
        title: '代理人',
        key: 'agent',
        align: 'center',
        minWidth: 120,
    },
    {
        title: '组长',
        key: 'groupLeader',
        align: 'center',
        minWidth: 120,
    },
    {
        title: '代理组长',
        key: 'agentGroupLeader',
        align: 'center',
        minWidth: 120,
    },
    {
        title: '操作',
        key: 'action',
        align: 'center',
        slot: 'action',
        fixed: "right",
        minWidth: 150,
    },
]
